import { createRouter, createWebHistory } from 'vue-router'
import type { RouteRecordRaw } from "vue-router";
const homeRoutes: RouteRecordRaw[] = [
  {
    path: "/mine",
    name: "mine",
    component: () => import("../views/Home/Mine.vue")
  }
]

const WowRoutes: RouteRecordRaw[] = [
  {
    path: "recommend",
    component: () => import("../views/Wow/WowRecommend.vue")
  },
  {
    path: "live",
    component: () => import("../views/Wow/WowLive.vue")
  },
]

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    redirect: '/home'
  },
  {
    path: "/home",
    name: 'home',
    component: () => import("../views/Home/Home.vue"),
    children: homeRoutes
  },
  {
    path: "/study",
    name: "study",
    component: () => import("../views/Study.vue")
  },
  {
    path: '/wow',
    name: 'wow',
    redirect: '/wow/recommend',
    component: () => import("../views/Wow/Wow.vue"),
    children: WowRoutes
  },
  {
    path: '/xiaoq',
    name: 'xiaoq',
    component: () => import("../views/XiaoQ.vue")
  },
  {
    path: '/vip',
    name: 'vip',
    component: () => import("../views/Vip.vue")
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})



export default router
